Re: [racket-users] Re: Retina display for OpenGL

2019-08-06 Thread Kshitij Sachan
9 AM 'Mark Warren' via Racket Users > > wrote: > > > > That's a shame, I'm afraid I'm out of ideas then. Hopefully someone else > will know. > > > > On Thursday, 1 August 2019 14:36:07 UTC+1, Kshitij Sachan wrote: > >> > >> I've

[racket-users] Re: Retina display for OpenGL

2019-08-01 Thread Kshitij Sachan
kt%29._gl-config~25%29._set-hires-mode%29%29> > hires-mode) > > That may be what you need. > > On Thursday, 1 August 2019 14:36:07 UTC+1, Kshitij Sachan wrote: >> >> I've set up an OpenGL context that is displayed in a snip (I chose a snip >> because I want t

[racket-users] Re: Retina display for OpenGL

2019-08-01 Thread Kshitij Sachan
Here is some more information about how I get the OpenGL context. First, I make a bitmap using `make-gl-bitmap`. Then, I make a bitmap-dc% object that contains my glbitmap and get its gl-context% object using `get-gl-context`. On Thursday, August 1, 2019 at 9:36:07 AM UTC-4, Kshitij Sachan

[racket-users] Retina display for OpenGL

2019-08-01 Thread Kshitij Sachan
I've set up an OpenGL context that is displayed in a snip (I chose a snip because I want to be able to move the camera around and generally respond to user input). However, I've noticed that the OpenGL context in Racket looks considerably worse than when I run the same OpenGL code in C++ (the

[racket-users] Re: Problem with `copy` method of image-snip%

2019-07-16 Thread Kshitij Sachan
method, but I don't know enough to parse what's going on there. Here is the Racket source code implementation of an image-snip% https://github.com/racket/snip/blob/1a0ef3670ebb13e8738d838db167c3abdbf3df28/snip-lib/racket/snip/private/snip.rkt#L888. On Friday, July 12, 2019 at 1:19:39 PM UTC-4,

[racket-users] How to make a snip appear?

2019-07-12 Thread Kshitij Sachan
I've been trying to render an OpenGL context using a gl-bitmap and then displaying that in a snip (to enable user input). I extended the image snip class and overrode the basic methods to draw, get-extent, etc. When I try to display my snip, I see nothing, but when I highlight over the snip

[racket-users] Snip responds to scroll input

2019-07-10 Thread Kshitij Sachan
I want to make a snip that resizes based on vertical scroll input. I currently have the following snip code: #lang racket (require racket/gui racket/gui/base) ;; snip-class (define test-snip-class (make-object (class snip-class% (inherit set-classname) (super-new)

[racket-users] Snip bug: "should have been overridden context"

2019-07-08 Thread Kshitij Sachan
I'm setting up a very simple snip class that is based on the example in the documentation ( https://docs.racket-lang.org/gui/editor-overview.html#%28part._snip-example%29 Section 5.4). I was able to generate a snip that is a circle that grows in size when the up arrow key is pressed.

Re: [racket-users] Racket plugin access the path of a file

2019-06-26 Thread Kshitij Sachan
`get-info`, then you can get the current > document filename like so: > > (send (object-name ip) get-filename) > > And pass it as an argument to your button function. > > > On Jun 25, 2019, at 1:10 PM, Kshitij Sachan > wrote: > > I'm trying to make a language-specific

[racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-25 Thread Kshitij Sachan
I'm working on a DSL to represent 3D geometrical shapes. I'm adding a language-specific plugin (toolbar button) that should: 1) expand the source code to get a module object, 2) evaluate the module object, 3) dynamic-require that module object, 4) Create an OpenGL Context, 5) render this

[racket-users] Racket plugin access the path of a file

2019-06-25 Thread Kshitij Sachan
I'm trying to make a language-specific toolbar button that when clicked prints the path of the file the button is clicked from. I've been able to set up the button, but how I don't know how to access the path of the current file. I've basically got two different files, let's call them