[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] guile-figl - Add wrappers for common texture functions.

From: David Thompson
Subject: Re: [PATCH] guile-figl - Add wrappers for common texture functions.
Date: Fri, 19 Jul 2013 18:53:16 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 07/19/2013 12:38 PM, Daniel Hartwig wrote:
On 13 June 2013 09:14, David Thompson <address@hidden> wrote:
Filled in some holes regarding OpenGL texture functions. There are 2
left as TODO that I'm not quite sure how to handle nicely.


Thanks also for this patch, though I am not applying it at the moment.
  I have inserted some comments inline, and also have opened up another
block of time where I can do more work on this soon.

Note that you can (temporarily) define any missing interfaces in your
local project and avoid asking your users to run a patched figl.
Having looked at this patch, it seems you probably want to just access
the low-level bindings in (figl gl low-level) module directly, and
third party libraries are encouraged to do so.

Anyway, thanks again for the efforts and hope to get more high-level
interfaces shortly.

  figl/gl.scm | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
  1 file changed, 72 insertions(+), 4 deletions(-)

diff --git a/figl/gl.scm b/figl/gl.scm
index edbd7c8..4924be1 100644
--- a/figl/gl.scm
+++ b/figl/gl.scm
@@ -293,7 +293,75 @@

  (re-export (%glShadeModel . set-gl-shade-model))

+;;; 3.8.1 Texture Image Specification
+(re-export (%glTexImage3D . gl-texture-image-3d)
+           (%glTexImage2D . gl-texture-image-2d)
+           (%glTexImage1D . gl-texture-image-1d))
For the high level interface, we really like to have some sanity
checks on the supplied data.  The same applies to most of the other

Third party libraries are encouraged to directly access these
low-level bindings as appropriate, they are in the (figl gl low-level)
Then that is what I'll do for my project, then. Thanks.

+;;; 3.8.4 Texture Parameters
+(re-export  (%glTexParameteri . gl-texture-parameter))
What about float parameters, and vectors?'

+;; emacs: (put 'with-gl-bind-texture 'scheme-indent-function 2)
+(define-syntax-rule (with-gl-bind-texture target id body ...)
+  (begin
+    (%glBindTexture target id)
+    body
+    ...
+    (%glBindTexture target 0)))
With this style it should revert to the previous texture bound to
TARGET, which can be queried and may not be ‘0’.

Good point.


Thanks for the helpful feedback. Now I know a bit more about the guidelines for the high level interface. I'll just use (figl gl low-level) for now.

- Dave

reply via email to

[Prev in Thread] Current Thread [Next in Thread]