Commit Graph

411 Commits (master)

Author SHA1 Message Date
Thom de Villa b7a4792291 fixed type usage
in some situations int and GLsizei is not the same type which leads to conversion warnings
2015-08-07 21:24:45 +02:00
Mikko Mononen 6ae087333d Merge pull request #226 from olliwang/framebuffer
Improve the use of NVGLUframebuffer.
2015-06-13 11:10:04 +03:00
Olli Wang 32db574853 Improve the use of NVGLUframebuffer.
The `NVGLUframebuffer` structure contains a `ctx` member but was actually never used. This commit takes advantage of the `ctx` property so there is no need to keep the reference of the context elsewhere after calling `nvgluCreateFramebuffer()`, or it would add difficulty for maintenance. As a result, the `nvgluDeleteFramebuffer()` function only needs to take one `NVGLUframebuffer` instance as the parameter.
2015-06-11 20:28:38 +08:00
Mikko Mononen 1de6fa5cdd Merge pull request #207 from alexbrazier/patch-1
Fix spelling mistake in readme
2015-03-13 09:49:02 +02:00
Alex Brazier 01141b2e88 Fix spelling mistake in readme 2015-03-12 22:40:15 +00:00
Andrew Corrigan 3eeafc1a14 Fix for issue #172 2015-02-21 10:15:13 -05:00
Mikko Mononen 3a5e25cc67 Merge pull request #196 from waywardmonkeys/fix-typos
Fix typos.
2015-01-09 17:07:38 +02:00
Bruce Mitchener 98b116165d Fix typos. 2015-01-09 18:55:47 +07:00
Mikko Mononen 31f9feb401 Fix for #191
- fixed stroke to use lino join style to calculate required vertex
count
2014-12-31 20:02:56 +02:00
Mikko Mononen 90862ce25c Fix for issue #175
Line break would duplicate a word if the first character of a word
would cause a line break
2014-11-11 23:30:15 +02:00
Mikko Mononen 1a0550ebc7 Merge pull request #185 from SmilyOrg/patch-2
Added check in addPoint to avoid duplicated moveTos breaking
2014-11-11 21:22:49 +02:00
Mikko Mononen 8b849004d4 Merge pull request #165 from floooh/pr_redundant_state_filter
Redundant GL state filter
2014-11-11 21:15:47 +02:00
Miha Lunar f8086a2006 Added check in addPoint to avoid duplicated moveTos breaking
It guards addPoint from "stealing" the point from the previous path if they're the same, which makes it break when you do something like this:
```
moveTo(50, 50)
moveTo(50, 50)
lineTo(100, 100)
```

Before the fix there's no line shown. With the second moveTo, there's a second path added, but without the 50,50 point, because it was already added with the first moveTo. This makes the second path only contain the point 100,100 so it doesn't draw at all.

After the fix, the point equality check is ignored for the first point in the path, so the second path gets the 50,50 point too and that makes it behave as expected.

This is only one solution to the duplicated moveTo problem and it's likely not the best one, but it's one that's easy to add and it seems to work just fine.
2014-11-11 16:45:51 +01:00
Mikko Mononen 315914acfd Merge pull request #184 from olliwang/fbo
Fixes nvgluCreateFramebuffer().
2014-11-07 09:46:24 +02:00
Olli Wang 71a2bdf8af Fixes nvgluCreateFramebuffer().
The framebuffer and renderbuffer did restore in `nvgluCreateFramebuffer()` on succeed. However, they are not restored if error occurs. This commit fixes it.
2014-11-07 15:19:43 +08:00
Mikko Mononen f75078f594 Merge pull request #183 from csaken/master
Fixed compile error occuring if FONS_USE_FREETYPE is defined.
2014-11-01 15:06:57 +02:00
Jancsi Farkas a473d72ecf Fixed compile occuring if FONS_USE_FREETYPE is defined. 2014-11-01 07:54:45 +02:00
Mikko Mononen b048742da4 Updated out dated docs in read me 2014-10-31 17:09:53 +02:00
Mikko Mononen fc3b7a013e Merge pull request #174 from SmilyOrg/patch-1
Consistent code syntax and typo fix
2014-09-25 12:21:45 +03:00
Miha Lunar 13e877ed37 Consistent code syntax and typo fix 2014-09-25 11:19:02 +02:00
Mikko Mononen cab10c7c0f Merge pull request #170 from olliwang/static
Fixed syntax error of checking defined identifier
2014-09-16 16:24:05 +03:00
Olli Wang 2300bf3594 Fixed syntax error of checking defined identifier
The syntax is wrong when checking defined identifier.
2014-09-16 21:10:58 +08:00
Mikko Mononen bf29db7d60 Merge pull request #169 from olliwang/cancel
Added nvgCancelFrame()
2014-09-16 12:00:45 +03:00
Olli Wang c120079425 Added nvgCancelFrame()
This commit implements a new nvgCancelFrame() function for the purpose described in #168.

Currently, if calling nvgBeginFrame(), the nvgEndFrame() function must be called to finish the drawing. However, if knowing the drawing would take too much time and want to give up the drawing. There is no way to cancel it. nvgCancelFrame() gives another choice to end the frame without actually drawing.
2014-09-16 13:02:13 +08:00
Mikko Mononen 388ea6b8c6 Merge pull request #164 from floooh/pr_uniform_array_2
Merge uniforms into a single uniform array
2014-09-05 10:09:58 +03:00
Mikko Mononen 4ce074f9b6 Merge pull request #163 from olliwang/gles_fbo
Add FBO support for GLES
2014-09-04 23:17:51 +03:00
Mikko Mononen 24ae5f0fb9 Merge pull request #166 from olliwang/pow2check
Fix for issue #162
2014-09-04 23:16:19 +03:00
Olli Wang 2cee1c0f93 Add FBO support for GLES
To support FBO for iOS, the current framebuffer and renderbuffer must be restored after calling nvgluCreateFramebuffer(). The framebuffer should also be restored when calling nvgluBindFramebuffer(NULL) as well.
2014-09-05 03:48:01 +08:00
Olli Wang 8e401a5f42 Fix for issue #162 2014-09-05 03:35:40 +08:00
Andre Weissflog 4aadf46465 Don't set redundant GL state (glBindTexture, glStencilFunc, glStencilMask) 2014-09-04 21:12:27 +02:00
Andre Weissflog aa6751ee4a Merge uniforms into a single uniform array, reducing number of glUniform calls.
Conflicts:
	src/nanovg_gl.h
2014-09-04 20:18:58 +02:00
Mikko Mononen 994b60b83f Moved image repeat (tiling) from pattern to image creation
- API changed!
- moved image repeat from nvgImagePattern() into image creation
nvgCreateImage*()
- made flip-y and premultiplied common image flags (not just GL)
- removed nvglImageFlags(), flags passed in via
nvglCreateImageFromHandle() flags
- nvgluCreateFramebuffer takes image flags as param
2014-09-02 21:57:59 +03:00
Mikko Mononen 96f08f4ca4 Fix for issue #155
- added NVG_DEBUG which can be used to omit calls to glGetError()
- removed return value for glnvg__checkError
- create flag defines to enum
2014-09-02 20:58:17 +03:00
Mikko Mononen 64960cf82d Merge pull request #148 from pupil-labs/master
added new graph style
2014-09-02 19:54:49 +03:00
Mikko Mononen dc70bbc3f3 Merge pull request #156 from floooh/pr_clamp_to_edge
Fix texture completeness for non-POT textures on GLES2/WebGL
2014-09-02 19:54:12 +03:00
Andre Weissflog e9add93849 Fix texture completeness for non-POT textures on GLES2/WebGL 2014-08-30 14:06:44 +02:00
Mikko Mononen 9bb72f02bd Merge pull request #149 from rockolo/master
Restore openGL state / unbind buffer
2014-08-27 06:59:49 +03:00
Philipp Rockel 697bfd824d Restore openGL state / unbind buffer
These changes make it possible to integrate nanoVG into other openGL libraries like Cinder and openFrameworks and be able to draw afterwards.
2014-08-26 17:06:12 -04:00
Moritz Kassner b112ce00b7 added new graph style 2014-08-26 09:00:25 +02:00
Mikko Mononen 6b69e7bce0 Fix for issue #143
- removed duplicate call to nvgTextMetrics()
2014-07-30 17:57:09 +03:00
Mikko Mononen bd762f81a6 Fix for issue #142
- set default lineHeight to 1.0
2014-07-30 17:54:29 +03:00
Mikko Mononen 646b0a56cc Merge pull request #138 from notlion/fix-double-transform
Set commandx/y before the transform
2014-07-17 12:49:46 +03:00
Ryan Alexander 312052816e Set commandx/y before the transform
This prevents commands like `nvgQuadTo` and `nvgArcTo` from double-transforming the previous point when they pass it back to `nvg__appendCommands`.
2014-07-17 02:09:12 -07:00
Mikko Mononen 14df146ea1 Added nvgIntersectScissor()
- added function to allow to combine scissor rects using intersection
2014-07-13 13:30:54 +03:00
Mikko Mononen f56b9e6c42 Started projects section
- added projects section to read me
- added processing API link (issue #135)
2014-07-11 19:23:30 +03:00
Mikko Mononen 8519f09569 Changed demos to use types not structs 2014-07-11 19:21:19 +03:00
Mikko Mononen 19f19847fe Typedef'd structs.
- added typedefs for all structs
- fixed some compiler warnings
2014-07-11 19:16:03 +03:00
Mikko Mononen 14fe41af89 Merge pull request #129 from andrewcorrigan/master
only specify precision for fragment shader
2014-07-11 18:45:26 +03:00
Mikko Mononen d26ddd6c1f Merge branch 'cmaughan-nanovg_master' 2014-07-11 18:39:26 +03:00
Mikko Mononen a52c9a1241 Merged font texture creationg conflict. 2014-07-11 18:39:10 +03:00