Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


SHOKWAV

Member Since 26 May 2011
Offline Last Active Dec 18 2014 06:46 PM

Posts I've Made

In Topic: GUI nightmares

24 October 2014 - 11:14 AM

Eh, your code actually looks pretty slick, considering you're doing GUI programming. Also, the "established libraries" for GUIs are notoriously bulky, so hand-rolling a solution is actually a viable option in this case.


In Topic: How to Render Only a Section of a Texture (OpenGL 3.1)?

10 December 2012 - 05:56 AM

Ah well that makes sense. Although I thought UVs were only for supplying corners.

In Topic: Lighting and Shading 101

09 December 2012 - 03:27 PM

Seems that glut is messing with some internal state, no? You really shouldn't be using glut or fixed-functionality.

In Topic: How to Render Only a Section of a Texture (OpenGL 3.1)?

09 December 2012 - 03:25 PM

The uvs are computed from xml files at run-time. But I can't 'skip' a portion of a texture using supplied uvs, right? Also, what I'm using is working, I just moved it to the fragment shader.

In Topic: How to Render Only a Section of a Texture (OpenGL 3.1)?

09 December 2012 - 09:54 AM

I don't see how this could be done CPU wise? But here's what I'm attempting to use to render a section of a texture (frag shader)

#version 140

in vec4 frag_color;

in vec2 frag_tex_coord;

uniform sampler2D tex;

uniform vec2 frag_tex_coord_offset;

void main(){

gl_FragColor = texture(tex, frag_tex_coord + frag_tex_coord_offset);

}


PARTNERS