Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


SHOKWAV

Member Since 26 May 2011
Offline Last Active Jan 24 2015 08:29 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